package com.superimprove;

import java.util.Objects;

public class UserInfo {
    private int id;
    private String name;
    private String type;
    private int score;
    private String legal;

    public UserInfo() {
    }

    public UserInfo(int id, String name, String type, int score, String legal) {
        this.id = id;
        this.name = name;
        this.type = type;
        this.score = score;
        this.legal = legal;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public String getLegal() {
        return legal;
    }

    public void setLegal(String legal) {
        this.legal = legal;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserInfo userInfo = (UserInfo) o;
        return id == userInfo.id && score == userInfo.score && Objects.equals(name, userInfo.name) && Objects.equals(type, userInfo.type) && Objects.equals(legal, userInfo.legal);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, type, score, legal);
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", score=" + score +
                ", legal='" + legal + '\'' +
                '}';
    }
}
